package com.dailyblue.java;

import lombok.SneakyThrows;

import java.io.*;

// 转换流
public class DemoG {
    @SneakyThrows
    public static void main(String[] args) {
        byte[] bytes = "张三".getBytes();
        InputStream in = new ByteArrayInputStream(bytes);
        // 字节输入流---->字符输入流
        Reader reader = new InputStreamReader(in);
        int ch = reader.read();
        System.out.println(ch);
        System.out.println("------------------------------------");
        OutputStream out = new ByteArrayOutputStream();
        // 字节输出流---->字符输出流
        Writer writer = new OutputStreamWriter(out);
    }
}
